Essential Object Oriented Design in Ruby by Bala Paranj
Author:Bala Paranj [Paranj, Bala]
Language: eng
Format: epub, pdf
Published: 2016-03-20T23:00:00+00:00
Step 2
Let's extract the logic to find if anyone has a birthday today.
# Person and PersonFileStore classes is same as before.
# This class encapsulates the logic to find out if the birthday is today or not.
# It has no dependency on other objects
class BirthDay
def initialize(month, day)
@month = month
@day = day
end
def today?
(@month.to_i == Date.today.month) and (@day.to_i == Date.today.day)
end
end
pfs = PersonFileStore.new("#{Dir.pwd}/data.txt")
records = pfs.records
records.each do |person|
month = person.birth_month
day = person.birth_day
Download
Essential Object Oriented Design in Ruby by Bala Paranj.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9931)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9806)
The Mikado Method by Ola Ellnestam Daniel Brolund(9798)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8317)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7798)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7777)
Grails in Action by Glen Smith Peter Ledbrook(7710)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7573)
Windows APT Warfare by Sheng-Hao Ma(7011)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6742)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6621)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6431)
Kotlin in Action by Dmitry Jemerov(5078)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4328)
Solidity Programming Essentials by Ritesh Modi(4096)
Functional Programming in JavaScript by Mantyla Dan(4050)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3889)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3838)
The Ultimate iOS Interview Playbook by Avi Tsadok(3806)
